package main

import (
	"fmt"
	"time"
)

func main() {
	location := time.FixedZone("UTC-777", 8*3600)
	fmt.Println(location)
	current := time.Now().In(location).Format("2006-01-02 15:04:05")
	fmt.Println(current)

	location = time.FixedZone("UTC-777", 12*3600)
	fmt.Println(location)
	current = time.Now().In(location).Format("2006-01-02 15:04:05")
	fmt.Println(current)

	location = time.FixedZone("UTC-777", -4*3600)
	fmt.Println(location)
	current = time.Now().In(location).Format("2006-01-02 15:04:05")
	fmt.Println(current)
	// 计算结果 = 当前时间 - 8h + offset)
}
